/**
 * 
 */
package nc.ui.wyx.basui;

import java.awt.Container;

import nc.ui.pub.query.QueryConditionClient;
import nc.ui.querytemplate.QueryConditionDLG;
import nc.ui.scm.pub.query.SCMQueryConditionDlg;
import nc.ui.scm.pub.sourceref.IBillReferQueryProxy;
import nc.vo.querytemplate.TemplateInfo;

/**
 * @author w_y_x
 *
 */
public class ItextQueryRefer extends IBillReferQueryProxy {
	WYXQueryClient dlg = null;
	/**
	 * 
	 */
	public ItextQueryRefer() {
		// TODO Auto-generated constructor stub
	}

	/**
	 * @param parent
	 */
	public ItextQueryRefer(Container parent) {
		super(parent);
		// TODO Auto-generated constructor stub
	}

	/**
	 * @param parent
	 * @param ti
	 */
	public ItextQueryRefer(Container parent, TemplateInfo ti) {
		super(parent, ti);
		// TODO Auto-generated constructor stub
	}

	/* (non-Javadoc)
	 * @see nc.ui.scm.pub.sourceref.IBillReferQueryProxy#createNewQryDlg()
	 */
	@Override
	public QueryConditionDLG createNewQryDlg() {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see nc.ui.scm.pub.sourceref.IBillReferQueryProxy#createOldQryDlg()
	 */
	@Override
	public QueryConditionClient createOldQryDlg() {
		// TODO Auto-generated method stub
		if(dlg == null){
			dlg = new WYXQueryClient(getContainer(),  getPkCorp(),
					getOperator(), getBusinessType(),getTemplateInfo().getFunNode());
			dlg.setBillRefModeSelPanel(true);
		}
		return dlg;
	}

	/* (non-Javadoc)
	 * @see nc.ui.scm.pub.sourceref.IBillReferQueryProxy#isNewQryDlg()
	 */
	@Override
	public boolean isNewQryDlg() {
		// TODO Auto-generated method stub
		return false;
	}

	/* (non-Javadoc)
	 * @see nc.ui.scm.pub.sourceref.IBillReferQueryProxy#isShowDoubleTableRef()
	 */
	@Override
	public boolean isShowDoubleTableRef() {
		// TODO Auto-generated method stub
		return ((SCMQueryConditionDlg) createOldQryDlg())
		.isShowDoubleTableRef();
	}

	/* (non-Javadoc)
	 * @see nc.ui.scm.pub.sourceref.IBillReferQueryProxy#setUserRefShowMode(boolean)
	 */
	@Override
	public void setUserRefShowMode(boolean isShowDoubleTableRef) {
		// TODO Auto-generated method stub
		((SCMQueryConditionDlg) createOldQryDlg())
		.setBillRefShowMode(isShowDoubleTableRef);
	}

}
